Integrand size = 23, antiderivative size = 50 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\frac {x}{b}-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a-b} b d} \]
Time = 2.26 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.00 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\frac {c+d x-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a-b}}}{b d} \]
Time = 0.31 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 25, 3650, 3042, 3660, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sinh ^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\sin (i c+i d x)^2}{a-b \sin (i c+i d x)^2}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\sin (i c+i d x)^2}{a-b \sin (i c+i d x)^2}dx\) |
\(\Big \downarrow \) 3650 |
\(\displaystyle \frac {x}{b}-\frac {a \int \frac {1}{b \sinh ^2(c+d x)+a}dx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {x}{b}-\frac {a \int \frac {1}{a-b \sin (i c+i d x)^2}dx}{b}\) |
\(\Big \downarrow \) 3660 |
\(\displaystyle \frac {x}{b}-\frac {a \int \frac {1}{a-(a-b) \tanh ^2(c+d x)}d\tanh (c+d x)}{b d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {x}{b}-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{b d \sqrt {a-b}}\) |
3.1.33.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)]^2)/((a_) + (b_.)*sin[(e_.) + (f_ .)*(x_)]^2), x_Symbol] :> Simp[B*(x/b), x] + Simp[(A*b - a*B)/b Int[1/(a + b*Sin[e + f*x]^2), x], x] /; FreeQ[{a, b, e, f, A, B}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Subst[Int[1/(a + (a + b)*ff^2*x^ 2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x]
Leaf count of result is larger than twice the leaf count of optimal. \(119\) vs. \(2(42)=84\).
Time = 0.11 (sec) , antiderivative size = 120, normalized size of antiderivative = 2.40
method | result | size |
risch | \(\frac {x}{b}+\frac {\sqrt {\left (a -b \right ) a}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a +2 \sqrt {\left (a -b \right ) a}-b}{b}\right )}{2 \left (a -b \right ) d b}-\frac {\sqrt {\left (a -b \right ) a}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {-2 a +2 \sqrt {\left (a -b \right ) a}+b}{b}\right )}{2 \left (a -b \right ) d b}\) | \(120\) |
derivativedivides | \(\frac {-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b}+\frac {\ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b}+\frac {2 a^{2} \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{b}}{d}\) | \(216\) |
default | \(\frac {-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b}+\frac {\ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b}+\frac {2 a^{2} \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{b}}{d}\) | \(216\) |
x/b+1/2*((a-b)*a)^(1/2)/(a-b)/d/b*ln(exp(2*d*x+2*c)+(2*a+2*((a-b)*a)^(1/2) -b)/b)-1/2*((a-b)*a)^(1/2)/(a-b)/d/b*ln(exp(2*d*x+2*c)-(-2*a+2*((a-b)*a)^( 1/2)+b)/b)
Leaf count of result is larger than twice the leaf count of optimal. 85 vs. \(2 (42) = 84\).
Time = 0.29 (sec) , antiderivative size = 464, normalized size of antiderivative = 9.28 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\left [\frac {2 \, d x + \sqrt {\frac {a}{a - b}} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + 8 \, a^{2} - 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 4 \, {\left ({\left (a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a b - b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + 2 \, a^{2} - 3 \, a b + b^{2}\right )} \sqrt {\frac {a}{a - b}}}{b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + {\left (2 \, a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}\right )}{2 \, b d}, \frac {d x - \sqrt {-\frac {a}{a - b}} \arctan \left (\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {-\frac {a}{a - b}}}{2 \, a}\right )}{b d}\right ] \]
[1/2*(2*d*x + sqrt(a/(a - b))*log((b^2*cosh(d*x + c)^4 + 4*b^2*cosh(d*x + c)*sinh(d*x + c)^3 + b^2*sinh(d*x + c)^4 + 2*(2*a*b - b^2)*cosh(d*x + c)^2 + 2*(3*b^2*cosh(d*x + c)^2 + 2*a*b - b^2)*sinh(d*x + c)^2 + 8*a^2 - 8*a*b + b^2 + 4*(b^2*cosh(d*x + c)^3 + (2*a*b - b^2)*cosh(d*x + c))*sinh(d*x + c) + 4*((a*b - b^2)*cosh(d*x + c)^2 + 2*(a*b - b^2)*cosh(d*x + c)*sinh(d*x + c) + (a*b - b^2)*sinh(d*x + c)^2 + 2*a^2 - 3*a*b + b^2)*sqrt(a/(a - b)) )/(b*cosh(d*x + c)^4 + 4*b*cosh(d*x + c)*sinh(d*x + c)^3 + b*sinh(d*x + c) ^4 + 2*(2*a - b)*cosh(d*x + c)^2 + 2*(3*b*cosh(d*x + c)^2 + 2*a - b)*sinh( d*x + c)^2 + 4*(b*cosh(d*x + c)^3 + (2*a - b)*cosh(d*x + c))*sinh(d*x + c) + b)))/(b*d), (d*x - sqrt(-a/(a - b))*arctan(1/2*(b*cosh(d*x + c)^2 + 2*b *cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^2 + 2*a - b)*sqrt(-a/(a - b ))/a))/(b*d)]
Timed out. \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for more details)Is
\[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\int { \frac {\sinh \left (d x + c\right )^{2}}{b \sinh \left (d x + c\right )^{2} + a} \,d x } \]
Time = 1.96 (sec) , antiderivative size = 473, normalized size of antiderivative = 9.46 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\frac {x}{b}-\frac {\sqrt {a}\,\mathrm {atan}\left (\frac {\left (b^5\,\sqrt {b^3\,d^2-a\,b^2\,d^2}-a\,b^4\,\sqrt {b^3\,d^2-a\,b^2\,d^2}\right )\,\left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\,\left (\frac {2\,\left (8\,a^2-8\,a\,b+b^2\right )\,\left (8\,a^{5/2}\,\sqrt {b^3\,d^2-a\,b^2\,d^2}-8\,a^{3/2}\,b\,\sqrt {b^3\,d^2-a\,b^2\,d^2}+\sqrt {a}\,b^2\,\sqrt {b^3\,d^2-a\,b^2\,d^2}\right )}{b^8\,d\,{\left (a-b\right )}^2\,\sqrt {b^3\,d^2-a\,b^2\,d^2}}+\frac {4\,\sqrt {a}\,\left (4\,a-2\,b\right )\,\left (8\,d\,a^3\,b-12\,d\,a^2\,b^2+4\,d\,a\,b^3\right )}{b^7\,\left (a-b\right )\,\sqrt {b^3\,d^2-a\,b^2\,d^2}\,\sqrt {-b^2\,d^2\,\left (a-b\right )}}\right )+\frac {2\,\left (2\,a^{3/2}\,b\,\sqrt {b^3\,d^2-a\,b^2\,d^2}-\sqrt {a}\,b^2\,\sqrt {b^3\,d^2-a\,b^2\,d^2}\right )\,\left (8\,a^2-8\,a\,b+b^2\right )}{b^8\,d\,{\left (a-b\right )}^2\,\sqrt {b^3\,d^2-a\,b^2\,d^2}}+\frac {4\,\sqrt {a}\,\left (2\,a^2\,b^2\,d-2\,a\,b^3\,d\right )\,\left (4\,a-2\,b\right )}{b^7\,\left (a-b\right )\,\sqrt {b^3\,d^2-a\,b^2\,d^2}\,\sqrt {-b^2\,d^2\,\left (a-b\right )}}\right )}{4\,a}\right )}{\sqrt {b^3\,d^2-a\,b^2\,d^2}} \]
x/b - (a^(1/2)*atan(((b^5*(b^3*d^2 - a*b^2*d^2)^(1/2) - a*b^4*(b^3*d^2 - a *b^2*d^2)^(1/2))*(exp(2*c)*exp(2*d*x)*((2*(8*a^2 - 8*a*b + b^2)*(8*a^(5/2) *(b^3*d^2 - a*b^2*d^2)^(1/2) - 8*a^(3/2)*b*(b^3*d^2 - a*b^2*d^2)^(1/2) + a ^(1/2)*b^2*(b^3*d^2 - a*b^2*d^2)^(1/2)))/(b^8*d*(a - b)^2*(b^3*d^2 - a*b^2 *d^2)^(1/2)) + (4*a^(1/2)*(4*a - 2*b)*(4*a*b^3*d - 12*a^2*b^2*d + 8*a^3*b* d))/(b^7*(a - b)*(b^3*d^2 - a*b^2*d^2)^(1/2)*(-b^2*d^2*(a - b))^(1/2))) + (2*(2*a^(3/2)*b*(b^3*d^2 - a*b^2*d^2)^(1/2) - a^(1/2)*b^2*(b^3*d^2 - a*b^2 *d^2)^(1/2))*(8*a^2 - 8*a*b + b^2))/(b^8*d*(a - b)^2*(b^3*d^2 - a*b^2*d^2) ^(1/2)) + (4*a^(1/2)*(2*a^2*b^2*d - 2*a*b^3*d)*(4*a - 2*b))/(b^7*(a - b)*( b^3*d^2 - a*b^2*d^2)^(1/2)*(-b^2*d^2*(a - b))^(1/2))))/(4*a)))/(b^3*d^2 - a*b^2*d^2)^(1/2)